local M = {}

function M.createText(str)
	local text = display.newText({
		text = str,
		--font = native.systemFont,
		fontSize = 13,
		--align = "left"
	})
	text.anchorX = 0
	text:setFillColor(unpack(colorCfg[7]))
	return text
end

function M.createTextWithInput(str, inputStr, inputType, onSubmit)
	local group = display.newGroup()

	local txt = M.createText(str)
	group:insert(txt)

	local gInput = inputUtils.createInputField({
		placeholder = inputStr,
		inputType = inputType,
		onSubmit = onSubmit
	})
	group:insert(gInput)
	gInput.x, gInput.y = txt.x + txt.width + gInput.width/2 + 5 , txt.y

	group.anchorChildren = true
	group.anchorX = 0

	function group:setText(str1)
		return gInput:setText(str1)
	end

	return group
end

return M